package com.molin.OOP.TestExtends.constructor;

public class Student extends Person {
    private int score;

    public Student() {
        System.out.println("我是子类的空参构造方法");
    }

    public Student(String name, int age, int score) {
//子类在初始化之前一定要完成父类数据的初始化
        super(name,age);
        this.score = score;
        System.out.println("我是子类的带参构造方法");

    }

    public Student(int score) {
        this.score = score;
        System.out.println("我是子类的带参构造方法");

    }
}
